//
//  Target_PlusRoute.m
//  TaoTuo
//
//  Created by admin on 2019/11/29.
//  Copyright © 2019 admin. All rights reserved.
//

#import "Target_PlusRoute.h"
#import "TTOpenShopViewController.h"
#import "TTDianpuManagerViewController.h"

@implementation Target_PlusRoute

- (UIViewController *)Action_viewControllerWithParams:(NSDictionary *)params
{
    if ([TTLoginSingle sharedSingle].mineDianpuShow) {
        // 开通商城
        if (![TTLoginSingle sharedSingle].isLogin) {
            TTLoginViewController *loginVC = [[TTLoginViewController alloc] init];
            UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:loginVC];
            nav.modalPresentationStyle = UIModalPresentationFullScreen;
            [[LLRouteTool getCurrentNavigationController] presentViewController:nav animated:YES completion:nil];
        } else {
            
            if ([TTLoginSingle sharedSingle].userModel.VipLevel == 1) {
                //商家，到店铺
                TTDianpuManagerViewController *dianpuVC = [[TTDianpuManagerViewController alloc] init];
                LLNavigationViewController *nav = [[LLNavigationViewController alloc] initWithRootViewController:dianpuVC];
                nav.modalPresentationStyle = UIModalPresentationFullScreen;
                return nav;
                
            } else {
                TTOpenShopViewController *openVC = [[TTOpenShopViewController alloc] initWithRenewal:NO];
                return openVC;
            }
            
        }
        
    }
    return nil;
}

@end
